{include file="admin/public/header" /}
<form role="form" method="post" action="{:url('ajax/setting/')}" class ="cmzForm">
<style type="text/css">
    .tab-pane{padding-top: 20px;padding: 20px;}
</style>
    <div class="row">
    <div class="col-sm-12">
    <div class="tabs-container">
            <div style="clear:both;height:20px"></div>
            <div class="tab-content">
                <div id="tab-1" class="tab-pane active">
                     <div class="ibox float-e-margins">
                            <div class="row">
                                <div class="col-sm-12 b-r">
                                   <div class="ibox-title">
                                        <a class="label label-primary pull-right tip" id="admin" msg="话题功能">话题功能<i class="fa fa-question"></i></a>
                                        <h5>话题</h5>
                                    </div>
                                    <div class="ibox-content">
                                     
<div class="aw-content-wrap">
    <form action="admin/ajax/save_topic/" id="settings_form" method="post" onsubmit="return false">
    <input type="hidden" name="topic_id" value="<?php echo $this->topic_info['topic_id']; ?>" />
    <div class="mod">
        <div class="mod-head">
            <h3>
               <!-- <span class="pull-left">话题编辑</span> -->
            </h3>
        </div>

        <div class="tab-content mod-content">
            <table class="table table-striped">
                <?php if ($this->topic_info) { ?>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('缩略图'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <a id="topic_pic_uploader"><img src="<?php echo get_topic_pic_url('mid', $this->topic_info['topic_pic']); ?>" alt="" id="topic_pic" class="img-polaroid" name="topic_pic" /></a>
                            </div>
                        </div>
                    </td>
                </tr>
                <?php } ?>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('话题标题'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <input type="text" name="topic_title" value="<?php echo $this->topic_info['topic_title']; ?>" class="form-control" />
                            </div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('话题描述'); ?>:</span>
                            <div class="col-sm-5 col-xs-8">
                                <textarea class="form-control" name="topic_description"  ><?php echo $this->topic_info['topic_description']; ?></textarea>
                            </div>
                        </div>
                    </td>
                </tr>

                <?php if ($this->topic_info) { ?>
                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('锁定状态'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="topic_lock" value="1"<?php if ($this->topic_info['topic_lock']) { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>

                                    <label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="topic_lock" value="0"<?php if (!$this->topic_info['topic_lock']) { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <?php } ?>

                <tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('根话题'); ?>:</span>
                            <div class="col-sm-6 col-xs-8">
                                <div class="btn-group mod-btn">
                                    <label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="is_parent" value="1"<?php if ($this->topic_info['is_parent']) { ?> checked="checked"<?php } ?> /> <?php e('是'); ?>
                                    </label>

                                    <label type="button" class="btn mod-btn-color">
                                        <input type="radio" name="is_parent" value="0"<?php if (!$this->topic_info['is_parent']) { ?> checked="checked"<?php } ?> /> <?php e('否'); ?>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr class="parent_topic_tr"<?php if ($this->topic_info['is_parent']) { ?> style="display: none;"<?php } ?>>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label"><?php e('选择根话题'); ?>:</span>
                            <div class="col-sm-4 col-xs-8">
                                <select id="parent_topic_select" class="collapse" name="parent_id">
                                <option value="0"> --- </option>
                                <?php if ($this->parent_topics) { foreach ($this->parent_topics AS $val) { ?>
                                <option value="<?php echo $val['topic_id']; ?>"<?php if ($val['topic_id'] == $this->topic_info['parent_id']) { ?> selected="selected"<?php } ?>><?php echo $val['topic_title']; ?></option>
                                <?php } } ?>
                                </select>

                                <div class="aw-publish-title">
                                    <div class="dropdown">
                                        <div class="dropdown-toggle">
                                            <input class="aw-hide-txt form-control" id="aw-topic-tags-select" placeholder="<?php e(根话题); ?>" />
                                            <a class="triangle"><i class="icon icon-down"></i></a>
                                        </div>
                                        <div class="aw-dropdown">
                                            <ul class="aw-dropdown-list">
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>

                <tfoot>
                <tr>
                    <td>
                        <input type="button" value="<?php e('保存设置'); ?>" class="btn btn-primary center-block"  />
                    </td>
                </tr>
                </tfoot>
            </table>
        </div>
    </div>
    </form>
</div>


                                    </div>
                                </div>
                                
                            </div>  
                            <div style="clear:both;height:5px"></div> 
                            <div class="hr-line-dashed"></div>
                             
                             
                             <div style="clear:both;height:5px"></div>    
                    </div>
                </div>
            </div>

        </div>
    </div>
        
           
</div>
<div style="clear:both;"></div>
 <div>
     
  
    </div>


           
   </form>

{include file="admin/public/footer" /}